<%@ taglib uri="/tags/struts-bean" prefix="bean" %> 
<%@ taglib uri="/tags/struts-html" prefix="html" %> 
<%@ taglib uri="/tags/struts-logic" prefix="logic" %> 
<%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>

<tiles:importAttribute />
<table width="100%" border="0" cellspacing="0">
	<tr>

		<td>
			<div class="tableHeadings">Time</div>
		</td>
		<td>
			<div class="tableHeadings">Price&nbsp;</div>
		</td>
		<td>
			<div class="dateHeading">Monday 30th January 2006</div>
		</td>
	</tr>

	<logic:iterate id="element" name="items"
		type="com.trainfinder.database.JourneyDetails" indexId="i">
		<tr>
			<td nowrap="nowrap"><!-- details -->
				<div class="tableContent">
					<bean:write name="element" property="departureHour" />:<bean:write name="element" property="departureMin" />
					-
					<bean:write name="element" property="arivalHour" />:<bean:write name="element" property="arivalMin" />
				</div>
			</td>

			<td nowrap="nowrap"><!-- price -->
				<div class="priceContent">
					&#163;<bean:write name="element" property="price" />&nbsp;
				</div>
			</td>

			<td width="100%" height="100%">	<!-- chart -->

				<table width="100%" height="100%" cellspacing="0">
					<tr>
					<tr>
						<bean:define id="width" name="element" property="percentageOfMaxPrice"/>
						<td width="<%=width %>%" style="background-color:#D7DEF8" />
						<td/>
					</tr>
				</table>
			</td>
		</tr>
	</logic:iterate>
</table>
